<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form action="/login_mysql/" method="POST" id="loginForm">
     <P>
用户名:<input type="text"name="uname"/>
     </P>
     <P>
密&emsp;码:<input type="password" name="pwd"/>
     </P>
     <P>
<input type="submit" value="登录" onclick="submitForm('/login_mysql/');"/>
<input type="submit" value="注册"onclick="submitForm('/register/');"/>
     </P>
</form>

<script>
    function submitForm(url) {
        document.getElementById('loginForm').action = url;
        document.getElementById('loginForm').submit();
    }
</script>
</body>
</html>
